package com.ltx.blog_ltx.mapper;

import com.ltx.blog_ltx.entity.dto.Rank;
import com.ltx.blog_ltx.entity.dto.Userinfo;
import com.ltx.blog_ltx.entity.pojo.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {

    List<Integer> AllUserId();

    String queryPwdByName(String userName);

    String getUserHeadByName(String userName);

    int enrollUserByEmile(User user);

    int enrollUserByPhone(User user);

    int resetPasswordByEmile(String zhanghao, String oldPassword, String newPassword);

    int resetPasswordByPhone(String zhanghao, String oldPassword, String newPassword);

    Integer queryIdByName(String userName);

    String queryNameByEmile(String userEmile);

    String queryNameByPhone(String phone);

    String queryEmileByName(String userName);

    String queryPhoneByName(String userName);

    Date queryBirthdayByName(String userName);

    int querySexByName(String userName);

    String queryNameById(int userId);

    User queryByName(String userName);

    int updateImg(String userHead,String userName);

    int increaseFanNum(int userId);

    int musFanNum(int userId);

    int increaseAttentionNum(int userId);

    int isemile(String emile);

    int isphone(String phone);

    int musAttentionNum(int userId);

    int FansNum(int userId);

    int AttentionNum(int userId);

    List<String>  attentionName(List<Integer> list);

    List<String>  attentionHead(List<Integer> list);

    Userinfo queryUserInfo(String userName);

    List<Userinfo> queryUserInfoList(int useId);

    int changeNote(String userName,String userNote);

    int queryFansNum(String userName);

    int queryAttentionNum(String userName);

    List<Rank> GetTop();

    int changeName(String userName,String newName);

    int bindPhone(String userName,String userPhone);

    int bindEmile(String userName,String userEmile);

    int changeBirthday(@Param("userName") String userName, @Param("userBirthday") Date userBirthday);
}
